im = imread('mixed.jpg');

% Find base colors from super pixels clustering
colors = findBaseColors(im);

kcolors = findColorClustersInHSV(1 - colors);

selected = greedyColors(kcolors);

close all;
scatter3(selected(:,1), selected(:,2), selected(:,3), 200, 1-selected, 'filled');

% Try Decomposition:
im2 = imread('D:\Projects\Thesis\leaf.jpg');
im2 = double(im2) / 255;
[strip all]  = wcd2(1 - im2, selected);

imwrite(strip, 'strip.jpg');
imwrite(all, 'all.jpg');